#ifndef __HALF_EDGE_H__
#define __HALF_EDGE_H__

#include <iostream>

class Vertex;
class Edge;
class Face;
class Loop;

class HalfEdge{
    public:
        HalfEdge(unsigned int);
        HalfEdge(unsigned int, Vertex*, Loop*);
        HalfEdge(unsigned int, Edge*, Vertex*, Loop*);
        ~HalfEdge();

        void setEdge(Edge *);
        void setStart(Vertex *);
        void setLoop(Loop *);

        unsigned int getID();
        Edge *getEdge();
        Vertex *getStart();
        Loop *getLoop();

        HalfEdge *getTwin();

        void setNext(HalfEdge *);
        void setPrev(HalfEdge *);
        HalfEdge *getNext();
        HalfEdge *getPrev();

    private:
        unsigned int id;
        Edge *edge;
        Vertex *start;
        Loop *loop;

        HalfEdge *next, *prev;
};

#endif
